import service from "@/utils/https";


/**
 * 添加rtcm分组
 */
export interface RtcmGroupDTO {
    /**
     * ntrip分组名称
     */
    groupName: string;
    id?: number
}

export function addRtcmGroupAPI(data: RtcmGroupDTO) {
    return service({
        method: "POST",
        url: "/rtcmGroup",
        data
    });
}

/**
 * 删除分组
 */
export function deleteRtcmGroupAPI(id: number) {
    return service({
        method: "DELETE",
        url: `/rtcmGroup/${id}`
    });
}

/**
 * 编辑分组
 */
export function updateRtcmGroupAPI(data: RtcmGroupDTO) {
    return service({
        method: "PUT",
        url: "/rtcmGroup",
        data
    });
}

/**
 * 查询分组
 */
export interface RtcmGroupSelectParams {
    pageSize: number
    pageNum: number
    name?: string
}
export function getRtcmGroupListAPI(params: RtcmGroupSelectParams) {
    return service({
        method: "GET",
        url: "/rtcmGroup",
        params
    });
}